from typing import Optional
from fastapi import APIRouter
from pydantic import BaseModel
from apps.models import User, Locations
from datetime import timedelta
from utils.JWT import create_access_token

location = APIRouter()





@location.get('/msg')
async def get_all_locations():
    """
    获取所有地点信息
    :param page: 页码
    :param page_size: 每页数量
    :return:
    """
    locations = await Locations.all().values("location_id", "name", "description")

    return {
        "status": 200,
        "message": "Success",
        "data": {}
    }
